package classDemo;
class Student {
    private final String name;
    private final int age;
    private final String gender;
    private final double chineseScore;
    private final double mathScore;
    private final double englishScore;

    public Student(String name, int age, String gender, double chineseScore, double mathScore, double englishScore) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.chineseScore = chineseScore;
        this.mathScore = mathScore;
        this.englishScore = englishScore;
    }

    public String getName() {
        return name;
    }

    public double getTotalScore() {
        return chineseScore + mathScore + englishScore;
    }

    public double getChineseScore() {
        return chineseScore;
    }

    public double getMathScore() {
        return mathScore;
    }

    public double getEnglishScore() {
        return englishScore;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                ", totalScore=" + getTotalScore() +
                ", chineseScore=" + chineseScore +
                ", mathScore=" + mathScore +
                ", englishScore=" + englishScore +
                '}';
    }
}